﻿@{
    ViewBag.Title = "Index";
    Layout = "~/Views/_LayoutLogin.cshtml";
}

			<div class="login_form">
				<h3>Panel Login</h3>
				<div style="position:relative" class="niceform">   
					<fieldset>
						<dl>
							<dt><label for="email">Username:</label></dt>
							<dd><input type="text" name="" id="username" size="54">
                                <label style="display: block; color: red; float: right; margin-left: 5px; line-height: 20px; opacity: 0;" id="Errusername">Required</label>
                            </dd>
						</dl>
						<dl>
							<dt><label for="password">Password:</label></dt>
							<dd><input type="password" name="" id="password" size="54">
                            <label style="display: block; color: red; float: right; margin-left: 5px; line-height: 20px; opacity: 0;" id="Errpassword">Required</label>
                            </dd>
						</dl>
						
					</fieldset>
					<div style="background: none repeat scroll 0px 0px transparent; border: medium none; position: absolute; right: 48px;" class="ui-dialog-buttonpane ui-widget-content ui-helper-clearfix">
		            <div class="ui-dialog-buttonset">
			            <button type="button" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" id="loginUser"><span class="ui-button-text">Đăng Nhập</span></button>
			            <button type="button" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" id="dangky"><span class="ui-button-text">Đăng Ký</span></button>
		            </div>
	            </div>
				</div>
			</div>            	
 <script>
     $(document).ready(function () {
         $("#password").keypress(function (event) {
             if (event.keyCode == 13) {
                 Login.login();
                 event.preventDefault();
             }
         });
            $("#loginUser").click(function () {
                Login.login();
            });
            $("#dangky").click(function () {
                location.href = Editor.Url + "/dangky";
            });
        });
    </script>